package com.kpf.springcloud.controller;

import com.kpf.springcloud.common.ResultJson;
import com.kpf.springcloud.pojo.KpfUser;
import com.kpf.springcloud.service.IKpfFollowUserService;
import com.kpf.springcloud.vo.FollowUserInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author shiwen
 * @date 2021/4/8
 */
@RestController
public class KpfFollowUserController {

    @Autowired
    private IKpfFollowUserService followUserService;

    @PostMapping("/follow/followUser")
    public ResultJson followUser(int userId) {
        followUserService.followUser(userId);
        return ResultJson.ok();
    }

    @GetMapping("/follow/getFollowInfo")
    public ResultJson getFollowInfo() {
        return ResultJson.ok(followUserService.getFollowInfo());
    }

    @GetMapping("/follow/getFollowUserList")
    public ResultJson getFollowUserList() {
        return ResultJson.ok(followUserService.getFollowUserList());
    }

    @GetMapping("/follow/getFansList")
    public ResultJson getFansList() {
        return ResultJson.ok(followUserService.getFansList());
    }

    //@GetMapping("/follow/getFansAndStatus")
    //public ResultJson getFansAndStatus(int followUserId) {
    //    return ResultJson.ok(followUserService.getUserFansAndStatusVO(followUserId));
    //}

}